package com.cmc.cloud.cmclink.doc.vo.blnofreightvo;

import java.math.BigDecimal;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 海运费附加费预计算 Base VO，提供给添加、修改、详细的子 VO 使用 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 * 
 * @author codegen
 */
@Data
public class BlnoFreightForecastBaseVO {

    @Schema(description = "提单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "21599")
    @NotNull(message = "{blnofreightforecast.blnoid.notnull}")
    private Long blnoId;

    @Schema(description = "费用代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{blnofreightforecast.chargecode.notblank}")
    @Length(max = 6, message = "{blnofreightforecast.chargecode.length}")
    private String chargeCode;

    @Schema(description = "计费维度 C=按体积吨计费，N=按箱计费，Y=按票计费", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{blnofreightforecast.per.notblank}")
    @Length(max = 1, message = "{blnofreightforecast.per.length}")
    private String per;

    @Schema(description = "箱型", example = "2")
    @Length(max = 2, message = "{blnofreightforecast.cntrtype.length}")
    private String cntrType;

    @Schema(description = "箱尺寸")
    @Length(max = 2, message = "{blnofreightforecast.cntrsize.length}")
    private String cntrSize;

    @Schema(description = "货类", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotBlank(message = "{blnofreightforecast.cargotype.notblank}")
    @Length(max = 5, message = "{blnofreightforecast.cargotype.length}")
    private String cargoType;

    @Schema(description = "件数", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{blnofreightforecast.quantity.notnull}")
    private BigDecimal quantity;

    @Schema(description = "费率", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{blnofreightforecast.rate.notnull}")
    private BigDecimal rate;

    @Schema(description = "金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{blnofreightforecast.amount.notnull}")
    private BigDecimal amount;

    @Schema(description = "币种", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{blnofreightforecast.currency.notblank}")
    @Length(max = 3, message = "{blnofreightforecast.currency.length}")
    private String currency;

}
